import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class demo19 {
    //写文件
    public static void main(String[] args) throws FileNotFoundException {
        byte[] bytes = new byte[1024];
        bytes[0] = 97;
        bytes[1] = 98;
        bytes[2] = 99;
        try (FileOutputStream fileOutputStream = new FileOutputStream("outputFile.txt", true)) {
            fileOutputStream.write(bytes, 0, 3);

        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
